Serialization is the process of generating a form (the “serial” or “serialized” form) of a runtime object that can be stored in a file, database, or some other location. The runtime object may later be reconstructed (“deserialized”) based on the serial form. A particular object to be serialized may include one or more transient fields and/or one or more non-transient fields. A transient field is a field for which, if the object is serialized, a value will not be included in a serial form of the object. A non-transient field is a field for which, if the object is serialized, a value will be included in a serial form of the object. Some objects in a system may not support serialization. For example, serializing an object may require access to the object via reflective operations. Reflective operations examine the runtime object to identify its class, fields, field values, etc. If an object is not open to reflective operations, serialization of that object may be prohibited. If a non-transient field of a serializable runtime object (the “referencing object”) references another object (the “referenced object”) that is not open to reflective operations, then attempting to serializing the referencing object may lead to runtime errors and/or unpredictable system behavior. For example, serialization of the referencing object may fail, resulting in data loss and/or unexpected termination of a process that relies on the object.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.